{extend name="public/base"}

{block name="title"}
发起投诉
{/block}

{block name="style"}
{css href="/static/wechat/css/refund.css" /}
{/block}

{block name="body"}
<div class="pageControl orderDetails">
    <form action="{:url('save_complaint')}" class="iptform">
    <div class="msui_nav msui_navTop" style="border-bottom: 1px solid #cccccc;">
        <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
        <h1 class="msui_navTop-title">发起投诉</h1>
    </div>

    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class="fs08">涉及退款订单:</p>
            </div>
            <div class="weui-cell__ft fs08" style="color: #333333;">{$order.order_sn}</div>
        </div>
    </div>

    <!--单选列表-->

    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class="refundreason">投诉原因</p>
            </div>
            <div class="weui-cell__ft">&nbsp;</div>
        </div>
    </div>
    <div class="weui-cells weui-cells_radio" style="margin-top: 0rem;">
        {volist name="austin_cause" id="vo"}
        <label class="weui-cell weui-check__label pding" for="x1{$i}">
            <div class="weui-cell__bd">
                <p>{$vo.name}</p>
            </div>
            <div class="weui-cell__ft">
                <input type="radio" class="weui-check" name="cause" id="x1{$i}" value="{$vo.name}" {eq name="i" value="1"} checked {/eq}>
                <span class="weui-icon-checked ggco"></span>
            </div>
        </label>
        {/volist}
    </div>
    <!--用户退款输入详细原因-->
    <span class="cause">输入详细的原因</span>

    <textarea name="audit_result_msg"></textarea>


    <!--<div class="weui-cells weui-cells_form" style="margin: 0rem;">
    <div class="weui-uploader__input-box">
        <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*"  file-attr="" />
    </div>
    <span class="imgnub  fs07">最多三张</span>
    </div>-->

    <!--提交按钮-->
    <input type="hidden" name="id" value="{$data.id}">
    <button class="tijiao fs085"style="margin-top: 7rem;" type="submit">提交</button>
    </form>
</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $(".iptform").submit(function (e) {
            e.preventDefault();
            var _this = $(this);
            $.ajax({
                type : 'POST',
                url : _this.attr('action'),
                data : _this.serialize(),
                dataType : 'json',
                success : function (msg) {
                    if (msg.code == 200) {
                        alert('申请成功！')
                        window.location.href = '{:url("austin/complaint_index")}';
                    } else {
                        var code = msg.code;
                        $.alert(error_code[code]);
                    }
                }
            });
        });
    });
</script>
{/block}